home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Answers 2002 January
/
PC Answers January 2002.7z
/
PC Answers January 2002.bin
/
graphics
/
freepixl
/
_SETUP.1
/
multimon.pxl
< prev
next >
Wrap
Text File
|
2001-09-20
|
5KB
|
195 lines
{ Filename : multimon.pxl
Purpose : <purpose>
Date : October 27, 1999
Author : Stewart DIBBS, VYSOR Integration Inc
History:
Version : 4.40 RELEASE
Update :
Date :
--------------------------------------------------------------------------}
Initialize: {only one instance allowed}
UseCoordinates(PIXEL)
Title$ = "PiXCL 5.0 and Multiple Monitors"
WinExist(Title$,Res)
If Res = 0 Then Goto One_Instance
Beep
WinSetActive(Title$,Res)
WinShow(Title$,RESTORE,Res)
End
One_Instance:
UseCaption(Title$) {change the title}
WinLocate(Title$,349,107,1100,641,Res)
UseBackground(TRANSPARENT,0,128,192)
WinShow(Title$,NOTOPMOST,Res)
DrawBackGround
DirGet(SourceDir$) {used later for library function calls}
{DragAcceptFile(ENABLE,AcceptFile)}
{AutoProgressBar(DISABLE)}
InfoMenu(REMOVE)
WaitInput(100)
SetMenu("&File",IGNORE,
"&New",CreatingFile,
"&Open",OpeningFile,
"&Save",SavingFile,
SEPARATOR,
"E&xit!",Terminate,
ENDPOPUP,
"&View",IGNORE,
"&ToolBar",ViewToolBar,
"&StatusBar",ViewStatusBar,
ENDPOPUP,
"&Information",IGNORE,
"&Concept",Concept,
"&Help",ShowAppHelp,
SEPARATOR,
"&About",About,
ENDPOPUP)
GoSub MakeToolbar
ChangeMenuItem("&ToolBar",CHECK,TBRes)
StatusWindow(ENABLE,BOTTOM,2,200,-1,0,0)
DrawStatusWinText(0,"Ready")
ChangeMenuItem("&StatusBar",CHECK,SBRes)
SetMouse(0,0,2500,1024,OpeningFile,n,n)
Wait_for_Input:
WaitInput()
Terminate:
End
Concept:
MessageBox(OK,1,INFORMATION,
"This is a skeleton of a PiXCL application. You could briefly
describe your application's function here, or provide some
basic help information.",
"PiXCL Skeleton Concept",Res)
Goto Wait_for_Input
ShowAppHelp:
{An application Help file usually has the same name as the application.}
Winhelp("multimon.hlp",CONTENTS,"")
Goto Wait_for_Input
About:
AboutUser("PiXCL 5.1 and Multiple Monitors", { or substitute Title$}
"Two lines of text goes here e.g. Application function.",
"Four Lines of additional information goes here, perhaps contact information and Web addresses")
Goto Wait_for_Input
ViewToolBar:
GetMenuStatus("&ToolBar",CHECKED,Res)
If Res = 0
GoSub MakeToolbar
ChangeMenuItem("&ToolBar",CHECK,Res)
Else
Toolbar()
ChangeMenuItem("&ToolBar",UNCHECK,Res)
Endif
Goto Wait_for_Input
ViewStatusBar:
GetMenuStatus("&StatusBar",CHECKED, Res)
If Res = 0
StatusWindow(ENABLE,BOTTOM,2,200,-1,0,0)
DrawStatusWinText(0,"Ready")
ChangeMenuItem("&StatusBar",CHECK,Res)
Else
StatusWindow(DISABLE,BOTTOM,2,200,-1,0,0)
ChangeMenuItem("&StatusBar",UNCHECK,Res)
Endif
Goto Wait_for_Input
CreatingFile:
WaitInput(1)
DrawBackground
WinGetClientRect(Title$,wx1,wy1,wx2,wy2)
EnumDisplayMonitors(m1x1,m1y1,m1x2,m1y2, Monitor_1_Name$,
m2x1,m2y1,m2x2,m2y2, Monitor_2_Name$)
DrawNumber(20,40,m1x1) DrawNumber(80,40,m1y1)
DrawNumber(100,80,m1x2) DrawNumber(160,80,m1y2)
DrawNumber(20,140,m2x1) DrawNumber(80,140,m2y1)
DrawNumber(100,180,m2x2) DrawNumber(160,180,m2y2)
GetVirtualScreenSize(Width, Height)
DrawNumber(50,200,Width) DrawNumber(100,200,Height)
Goto Wait_for_Input
DebugMsgBox(Monitor_2_Name$)
Monitor_1_Name$ = "1: " + Monitor_1_Name$
DebugMsgBox(Monitor_1_Name$)
MonitorFromWindow("",Monitor_1_Name$)
Monitor_1_Name$ = "2: " + Monitor_1_Name$
DebugMsgBox(Monitor_1_Name$)
MonitorFromRect(wx1,wy1,wx2,wy2,Monitor_1_Name$)
Monitor_1_Name$ = "3: " + Monitor_1_Name$
DebugMsgBox(Monitor_1_Name$)
MonitorFromPoint(100,200,Monitor_1_Name$)
Monitor_1_Name$ = "4: " + Monitor_1_Name$
DebugMsgBox(Monitor_1_Name$)
Goto Wait_for_Input
OpeningFile:
WaitInput(1)
UseBackground(TRANSPARENT,0,128,128)
DrawBackground
UseFont("Arial",13,27,NOBOLD,NOITALIC,NOUNDERLINE,0,0,0)
DrawText(20,60,"Display#1")
DrawText(1300,60,"Display#2")
Goto Wait_for_Input
SavingFile:
WaitInput(1)
{TODO: add file handling here}
MessageBox(OK,1,INFORMATION,"No operations coded for this button.",
"Saving File",Res)
Goto Wait_for_Input
PrintingFile:
WaitInput(1)
{TODO: add file handling here}
MessageBox(OK,1,INFORMATION,"No operations coded for this button.",
"Printing File",Res)
Goto Wait_for_Input
AcceptFile:
GetDragList(FileList$)
{TODO: add file list handling here, or delete this whole label handler}
Goto Wait_for_Input
{--- Style Suggestion: place all subroutines at the end of the script.}
MakeToolbar: {subroutine}
Toolbar( RAISED, PXL_LARGE,
NULL, NULL, SEPARATOR, "", Wait_for_Input,
PXL_NEW, ENABLED, STD, "FileNew", CreatingFile,
PXL_OPEN, ENABLED, STD, "FileOpen", OpeningFile,
PXL_SAVE, ENABLED, STD, "FileSave", SavingFile,
PXL_PRINT, ENABLED, STD,"PrintFile", PrintingFile,
NULL, NULL, SEPARATOR, "", Wait_for_Input,
HELPINFO, ENABLED, STD,"Show Help",ShowAppHelp)
Return